<?php require_once('header.php'); ?>
<?php //include_once('topwidget.php'); ?>

<div id="contentBox">
<?php include_once('sidebar.php'); ?>

<div id="content">
<h1>All Categories</h1>
<?php
	$allcatquery = "SELECT * FROM categories";
	connection();
	$categories = mysql_query($allcatquery);
	echo "<ul>";
	while($category = mysql_fetch_array($categories)) {
		echo "<li>";
			echo "<a href='subcatlist.php?catid=$category[cid]'>";
				echo $category['cname'];
			echo "</a>";
				echo "<p>".$category['cdesc']."</p>";
			
		echo "</li>";
?>
<?php
	}
	echo "</ul>";
?>
</div>
<div style="clear:both;"></div>

<?php //include_once('bottomwidget.php'); ?>
<?php include_once('footer.php'); ?>